class PhpLang
	attr_reader :initial_state, :version, :states, :keywords
	attr_writer :initial_state
	
	def initialize
		@version = '1.22'
		@initial_state ='OUT'
			@states = Dictionary.new
				@states["OUT"] = Array.new
					@states["OUT"][0] = Dictionary.new
						@states["OUT"][0]["/*"] = Array.new
						@states["OUT"][0]["/*"][0] = "COMMENT"
						@states["OUT"][0]["/*"][1] = 0

						@states["OUT"][0]["//"] = Array.new
						@states["OUT"][0]["//"][0] = "COMMENT1"
						@states["OUT"][0]["//"][1] = 0

						@states["OUT"][0]["?>"] = Array.new
						@states["OUT"][0]["?>"][0] = "_QUIT"
						@states["OUT"][0]["?>"][1] = 0

						@states["OUT"][0]["PHP_DELIM"] = Array.new
						@states["OUT"][0]["PHP_DELIM"][0] = "OUT"
						@states["OUT"][0]["PHP_DELIM"][1] = 0

						@states["OUT"][0]["$"] = Array.new
						@states["OUT"][0]["$"][0] = "VAR"
						@states["OUT"][0]["$"][1] = 0

						@states["OUT"][0]["\""] = Array.new
						@states["OUT"][0]["\""][0] = "QUOTE"
						@states["OUT"][0]["\""][1] = 0

						@states["OUT"][0]["\'"] = Array.new
						@states["OUT"][0]["\'"][0] = "QUOTE1"
						@states["OUT"][0]["\'"][1] = 0

						@states["OUT"][0]["ALPHA"] = Array.new
						@states["OUT"][0]["ALPHA"][0] = "FUNCTION"
						@states["OUT"][0]["ALPHA"][1] = -1

						@states["OUT"][0]["NUMBER"] = Array.new
						@states["OUT"][0]["NUMBER"][0] = "NUM"
						@states["OUT"][0]["NUMBER"][1] = 0


				@states["OUT"][1] = 1
				@states["OUT"][2] = nil
				@states["OUT"][3] = nil

				@states["FUNCTION"] = Array.new
					@states["FUNCTION"][0] = Dictionary.new
						@states["FUNCTION"][0]["!SAFECHAR"] = Array.new
						@states["FUNCTION"][0]["!SAFECHAR"][0] = "_RET"
						@states["FUNCTION"][0]["!SAFECHAR"][1] = 1


				@states["FUNCTION"][1] = 5
				@states["FUNCTION"][2] = "php-function"
				@states["FUNCTION"][3] = nil

				@states["COMMENT"] = Array.new
					@states["COMMENT"][0] = Dictionary.new
						@states["COMMENT"][0]["*/"] = Array.new
						@states["COMMENT"][0]["*/"][0] = "_RET"
						@states["COMMENT"][0]["*/"][1] = 0

						@states["COMMENT"][0]["_COUNTAB"] = Array.new
						@states["COMMENT"][0]["_COUNTAB"][0] = "COMMENT"
						@states["COMMENT"][0]["_COUNTAB"][1] = 0


				@states["COMMENT"][1] = 4
				@states["COMMENT"][2] = "php-comment"
				@states["COMMENT"][3] = nil

				@states["COMMENT1"] = Array.new
					@states["COMMENT1"][0] = Dictionary.new
						@states["COMMENT1"][0]["\n"] = Array.new
						@states["COMMENT1"][0]["\n"][0] = "_RET"
						@states["COMMENT1"][0]["\n"][1] = 0

						@states["COMMENT1"][0]["_COUNTAB"] = Array.new
						@states["COMMENT1"][0]["_COUNTAB"][0] = "COMMENT1"
						@states["COMMENT1"][0]["_COUNTAB"][1] = 0


				@states["COMMENT1"][1] = 4
				@states["COMMENT1"][2] = "php-comment"
				@states["COMMENT1"][3] = nil

				@states["VAR"] = Array.new
					@states["VAR"][0] = Dictionary.new
						@states["VAR"][0]["->"] = Array.new
						@states["VAR"][0]["->"][0] = "VAR"
						@states["VAR"][0]["->"][1] = 0

						@states["VAR"][0]["$"] = Array.new
						@states["VAR"][0]["$"][0] = "VAR"
						@states["VAR"][0]["$"][1] = 0

						@states["VAR"][0]["{"] = Array.new
						@states["VAR"][0]["{"][0] = "VAR"
						@states["VAR"][0]["{"][1] = 0

						@states["VAR"][0]["}"] = Array.new
						@states["VAR"][0]["}"][0] = "VAR"
						@states["VAR"][0]["}"][1] = 0

						@states["VAR"][0]["!SAFECHAR"] = Array.new
						@states["VAR"][0]["!SAFECHAR"][0] = "_RET"
						@states["VAR"][0]["!SAFECHAR"][1] = 1


				@states["VAR"][1] = 4
				@states["VAR"][2] = "php-var"
				@states["VAR"][3] = nil

				@states["QUOTE"] = Array.new
					@states["QUOTE"][0] = Dictionary.new
						@states["QUOTE"][0]["\\\""] = Array.new
						@states["QUOTE"][0]["\\\""][0] = "QUOTE"
						@states["QUOTE"][0]["\\\""][1] = 0

						@states["QUOTE"][0]["$"] = Array.new
						@states["QUOTE"][0]["$"][0] = "VAR"
						@states["QUOTE"][0]["$"][1] = 0

						@states["QUOTE"][0]["\""] = Array.new
						@states["QUOTE"][0]["\""][0] = "_RET"
						@states["QUOTE"][0]["\""][1] = 0


				@states["QUOTE"][1] = 4
				@states["QUOTE"][2] = "php-quote"
				@states["QUOTE"][3] = nil

				@states["QUOTE1"] = Array.new
					@states["QUOTE1"][0] = Dictionary.new
						@states["QUOTE1"][0]["\\\'"] = Array.new
						@states["QUOTE1"][0]["\\\'"][0] = "QUOTE1"
						@states["QUOTE1"][0]["\\\'"][1] = 0

						@states["QUOTE1"][0]["\'"] = Array.new
						@states["QUOTE1"][0]["\'"][0] = "_RET"
						@states["QUOTE1"][0]["\'"][1] = 0


				@states["QUOTE1"][1] = 4
				@states["QUOTE1"][2] = "php-quote"
				@states["QUOTE1"][3] = nil

				@states["NUM"] = Array.new
					@states["NUM"][0] = Dictionary.new
						@states["NUM"][0]["x"] = Array.new
						@states["NUM"][0]["x"][0] = "HEX_NUM"
						@states["NUM"][0]["x"][1] = 0

						@states["NUM"][0]["NUMBER"] = Array.new
						@states["NUM"][0]["NUMBER"][0] = "DEC_NUM"
						@states["NUM"][0]["NUMBER"][1] = 0

						@states["NUM"][0]["!NUMBER"] = Array.new
						@states["NUM"][0]["!NUMBER"][0] = "_RET"
						@states["NUM"][0]["!NUMBER"][1] = 1


				@states["NUM"][1] = 4
				@states["NUM"][2] = "php-num"
				@states["NUM"][3] = nil

				@states["DEC_NUM"] = Array.new
					@states["DEC_NUM"][0] = Dictionary.new
						@states["DEC_NUM"][0]["!NUMBER"] = Array.new
						@states["DEC_NUM"][0]["!NUMBER"][0] = "_RET"
						@states["DEC_NUM"][0]["!NUMBER"][1] = 1


				@states["DEC_NUM"][1] = 0
				@states["DEC_NUM"][2] = "php-num"
				@states["DEC_NUM"][3] = nil

				@states["HEX_NUM"] = Array.new
					@states["HEX_NUM"][0] = Dictionary.new
						@states["HEX_NUM"][0]["!HEXNUM"] = Array.new
						@states["HEX_NUM"][0]["!HEXNUM"][0] = "_RET"
						@states["HEX_NUM"][0]["!HEXNUM"][1] = 1


				@states["HEX_NUM"][1] = 0
				@states["HEX_NUM"][2] = "php-num"
				@states["HEX_NUM"][3] = nil

				@states["_QUIT"] = Array.new
				@states["_QUIT"][0] = nil
				@states["_QUIT"][1] = 8
				@states["_QUIT"][2] = "xlang"
				@states["_QUIT"][3] = nil


			@keywords = Array.new
			@keywords[0] = "php-keyword"
				@keywords[1] = Dictionary.new
				@keywords[1]["and"] = 1
				@keywords[1]["or"] = 1
				@keywords[1]["xor"] = 1
				@keywords[1]["__FILE__"] = 1
				@keywords[1]["__LINE__"] = 1
				@keywords[1]["__CLASS__"] = 1
				@keywords[1]["__METHOD__"] = 1
				@keywords[1]["__FUNCTION__"] = 1
				@keywords[1]["exception"] = 1
				@keywords[1]["php_user_filter"] = 1
				@keywords[1]["array"] = 1
				@keywords[1]["as"] = 1
				@keywords[1]["break"] = 1
				@keywords[1]["case"] = 1
				@keywords[1]["cfunction"] = 1
				@keywords[1]["class"] = 1
				@keywords[1]["const"] = 1
				@keywords[1]["continue"] = 1
				@keywords[1]["declare"] = 1
				@keywords[1]["default"] = 1
				@keywords[1]["die"] = 1
				@keywords[1]["do"] = 1
				@keywords[1]["echo"] = 1
				@keywords[1]["else"] = 1
				@keywords[1]["elseif"] = 1
				@keywords[1]["empty"] = 1
				@keywords[1]["enddeclare"] = 1
				@keywords[1]["endfor"] = 1
				@keywords[1]["endforeach"] = 1
				@keywords[1]["endif"] = 1
				@keywords[1]["endswitch"] = 1
				@keywords[1]["endwhile"] = 1
				@keywords[1]["eval"] = 1
				@keywords[1]["exit"] = 1
				@keywords[1]["extends"] = 1
				@keywords[1]["for"] = 1
				@keywords[1]["foreach"] = 1
				@keywords[1]["function"] = 1
				@keywords[1]["global"] = 1
				@keywords[1]["if"] = 1
				@keywords[1]["include"] = 1
				@keywords[1]["include_once"] = 1
				@keywords[1]["isset"] = 1
				@keywords[1]["list"] = 1
				@keywords[1]["new"] = 1
				@keywords[1]["old_function"] = 1
				@keywords[1]["print"] = 1
				@keywords[1]["require"] = 1
				@keywords[1]["require_once"] = 1
				@keywords[1]["return"] = 1
				@keywords[1]["static"] = 1
				@keywords[1]["switch"] = 1
				@keywords[1]["unset"] = 1
				@keywords[1]["use"] = 1
				@keywords[1]["var"] = 1
				@keywords[1]["while"] = 1
				@keywords[1]["define"] = 1
				@keywords[1]["defined"] = 1
				@keywords[1]["trigger_error"] = 1
				@keywords[1]["TRACE"] = 1
				@keywords[1]["trace"] = 1
				@keywords[1]["ASSERT"] = 1
				@keywords[1]["assert"] = 1


	end
end